import { NgModule } from '@angular/core';
import { CommonModule } from '@angular/common';
import { RouterModule } from '@angular/router';
import { FormsModule, ReactiveFormsModule } from '@angular/forms';

import { NzLayoutModule } from 'ng-zorro-antd/layout';
import { NzButtonModule } from 'ng-zorro-antd/button';
import { NzDividerModule } from 'ng-zorro-antd/divider';
import { NzMenuModule } from 'ng-zorro-antd/menu';
import { NzIconModule } from 'ng-zorro-antd/icon';
import { NzTableModule } from 'ng-zorro-antd/table';
import { NzBreadCrumbModule } from 'ng-zorro-antd/breadcrumb';
import { NzFormModule } from 'ng-zorro-antd/form';
import { NzGridModule } from 'ng-zorro-antd/grid';
import { NzSpaceModule } from 'ng-zorro-antd/space';
import { NzSelectModule } from 'ng-zorro-antd/select';
import { NzModalModule } from 'ng-zorro-antd/modal';
import { NzRadioModule } from 'ng-zorro-antd/radio';
import { NzDropDownModule } from 'ng-zorro-antd/dropdown';
import { NzMessageModule } from 'ng-zorro-antd/message';
import { NzCardModule } from 'ng-zorro-antd/card';
import { NzCollapseModule } from 'ng-zorro-antd/collapse';
import { NzTreeModule } from 'ng-zorro-antd/tree';
import { NzListModule } from 'ng-zorro-antd/list';

import { SphereContainerComponent } from './components/sphere-container/sphere-container.component';
import { DialogService } from './services/dialog.service';
import { MessageService } from './services/message.service';
import { WidgetAddComponent } from './components/widget-add/widget-add.component';
import { WidgetPanelComponent } from './components/widget-panel/widget-panel.component';
import { RobotContainerComponent } from './components/robot-container/robot-container.component';
import { PeriodictableContainerComponent } from './components/periodictable-container/periodictable-container.component';


// 引入zorro图标
const icons = [
];

// angular模块
const ANGULARMODULE = [
    CommonModule,
    FormsModule,
    RouterModule,
    ReactiveFormsModule
];

// ng-zorro模块
const NGZORROMODULE = [
    NzLayoutModule,
    NzButtonModule,
    NzDividerModule,
    NzMenuModule,
    NzTableModule,
    NzBreadCrumbModule,
    NzFormModule,
    NzGridModule,
    NzSpaceModule,
    NzSelectModule,
    NzModalModule,
    NzRadioModule,
    NzDropDownModule,
    NzMessageModule,
    NzCardModule,
    NzCollapseModule,
    NzTreeModule,
    NzListModule
];

// 公共组件
const COMPONENTS = [
    WidgetPanelComponent,
    WidgetAddComponent,
    SphereContainerComponent,
    RobotContainerComponent,
    PeriodictableContainerComponent,
];
// 公共服务
const SERVICES = [
    DialogService,
    MessageService,
];
// 公共管道
const PIPES: any[] = [
];
// 公共指令
const DIRECTIVES: any[] = [];


@NgModule({
    imports: [
        ...ANGULARMODULE,
        ...NGZORROMODULE
    ],
    declarations: [
        ...COMPONENTS,
        ...DIRECTIVES,
        ...PIPES,
    ],
    providers: [...SERVICES],
    exports: [
        ...ANGULARMODULE,
        ...NGZORROMODULE,
        ...COMPONENTS,
        ...DIRECTIVES,
    ]
})
export class SharedModule { }
